<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:core="http://www.contact.core.com/contacts/core/ui"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:common="http://www.contact.common.com/contacts/ui"
      xmlns:contact="http://www.contact.contact.com/contacts/contact/ui"
      xmlns:srch="http://www.contact.search.com/contacts/search/ui"
        >

<ui:component>

    <rich:panel style="overflow:auto;  width:100%; border:none"
                bodyClass="rich-laguna-panel-no-header">
        <a4j:outputPanel style="margin-top:20px; margin-bottom:20px" layout="block">
            <h:form>
                <rich:panel rendered="#{not accountBean.userLogedIn}"
                            style="overflow:auto; margin-bottom:20px;  width:100%;"
                            bodyClass="rich-laguna-panel-no-header">
                    <h:outputLabel style="color:gray;"
                                   value="#{resources.notLoginSearchText} ">
                        <a4j:commandLink value="#{resources.loginLabel}."
                                         reRender="loginModalPanel"
                                         oncomplete="Richfaces.showModalPanel('loginModalPanel');"
                                         limitToList="true"
                                />
                    </h:outputLabel>
                    <h:outputLabel style="color:gray" value="#{resources.ifYouNotCreateAccountText}">
                        <a4j:commandLink value="#{resources.createAccountButton}."
                                         limitToList="true"
                                         reRender="signUpAddModalPanel"
                                         action="#{welcome.prepareToAddNewAccount}"
                                         oncomplete="Richfaces.showModalPanel('signUpAddModalPanel');"
                                />
                    </h:outputLabel>
                </rich:panel>
                <!--<a4j:outputPanel layout="block" style="float:left">-->
                <h:inputText size="30" style="padding:3px 0 3px 3px; font-size:13px; font-weight:bold;"
                             value="#{searchSessionBean.simpleSearchKey}"/>
                <!--</a4j:outputPanel>-->
                <!--<a4j:outputPanel layout="block" style="float:right">-->
                <a4j:commandButton value="#{resources.searchLabel}"
                                   reRender="searchPanelContentResult"
                                   type="submit"
                                   action="#{searchBean.search}">

                </a4j:commandButton>
                <!--</a4j:outputPanel>-->
            </h:form>
        </a4j:outputPanel>
        <a4j:outputPanel id="searchPanelContentResult">
            <h:outputLabel style="color:black;font-weight:bold; font-size:12px"
                           rendered="#{not empty searchBean.searchResult}" value="#{resources.peopleLable} - ">
                <h:outputLabel style="color:blue;font-weight:bold;  font-size:12px"
                               value="#{searchBean.countOfSearchResult} #{resources.resultLabel}"/>
            </h:outputLabel>
            <h:outputLabel style="color:black ;font-weight:bold;  font-size:12px"
                           rendered="#{ empty searchBean.searchResult}" value="#{resources.noSearchResultText} ">
                <h:outputLabel style="color:blue; font-weight:bold;  font-size:12px"
                               value="#{searchSessionBean.simpleSearchKey}"/>
            </h:outputLabel>
            <rich:separator height="2px" width="100%"/>
            <a4j:outputPanel rendered="#{not empty searchBean.searchResult}">
                <srch:searchResultTable/>
            </a4j:outputPanel>
        </a4j:outputPanel>
    </rich:panel>


</ui:component>


</html>
